from typing import List

class Solution:
    def minCostClimbingStairs(self, cost: List[int]) -> int:
        length = len(cost)
        costRecords = [0] * 3
        for i in range(2, length + 1):
            costRecords[0] = costRecords[1]
            costRecords[1] = costRecords[2]
            
            costRecords[2] = min(costRecords[0] + cost[i-2], costRecords[1] + cost[i-1])    
            print(costRecords)
            
        return costRecords[2]



if __name__ == '__main__':
    s = Solution()
    print(s.minCostClimbingStairs([1,100,1,1,1,100,1,1,100,1]))